<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>three - webVr</title>
</head>
<body>
    <script src="./js/three.js"></script>
    <script src="./js/WebVR.js"></script>
    <script>
        let scene = new THREE.Scene(); //场景
        let camera = new THREE.PerspectiveCamera(75,window.innerWidth/window.innerHeight,0.1,1000);//相机
        let renderer = new THREE.WebGLRenderer();//渲染器
        renderer.setSize(window.innerWidth,window.innerHeight);
        document.body.appendChild(renderer.domElement);

        document.body.appendChild(THREE.WEBVR.createButton(renderer));
        renderer.vr.enabled = true;

        renderer.setAnimationLoop(()=>{
            renderer.render(scene, camera);
        });
    </script>
</body>
</html>